#include <cfixcc.h>
#include "ProjectHeader.h"
#include "UIElement-Slider.h"

class UITest : public cfixcc::TestFixture
{
private:

	UISliderElement TestUIE;
	vertex2f SizeVertex;				
	vertex2f PositionVertex;				
	vertex2f SliderPositionVertex;				
	vertex2f SliderSizeVertex;				
	texCoord2f BackgroundTexture;
	texCoord2f SliderTexture;
	texCoord2f SliderBackgroundTexture;
	UIStat_delegate StatDelegate;

public:


	static int StatFunc(int i)
	{
		return 75;
	}

	static void SetUp()
	{
		
	}

	static void TearDown()
	{
	}

	void Before()
	{
		UISliderElement TestUIE;

		UIStat_delegate StatDelegate(&UITest::StatFunc);
		
		vertex2f SizeVertex;				
		SizeVertex.u = 0.5f;				
		SizeVertex.v = 0.5f;

		vertex2f PositionVertex;				
		PositionVertex.u = 0.5f;				
		PositionVertex.v = 0.5f;

		vertex2f SliderPositionVertex;				
		SliderPositionVertex.u = 0.1f;				
		SliderPositionVertex.v = 0.1f;

		vertex2f SliderSizeVertex;				
		SliderSizeVertex.u = 0.8f;				
		SliderSizeVertex.v = 0.2f;

		texCoord2f BackgroundTexture;
		BackgroundTexture.btmLft.u = 0.0f;	BackgroundTexture.btmLft.v = 0.0f;
		BackgroundTexture.btmRgt.u = 0.5f;	BackgroundTexture.btmRgt.v = 0.0f;
		BackgroundTexture.topLft.u = 0.0f;	BackgroundTexture.topLft.v = 0.5f;
		BackgroundTexture.topRgt.u = 0.5f;	BackgroundTexture.topRgt.v = 0.5f;
		BackgroundTexture.TexIndex = 0;

		texCoord2f SliderTexture;
		SliderTexture.btmLft.u = 0.5f;	SliderTexture.btmLft.v = 0.0f;
		SliderTexture.btmRgt.u = 1.0f;	SliderTexture.btmRgt.v = 0.0f;
		SliderTexture.topLft.u = 0.5f;	SliderTexture.topLft.v = 0.5f;
		SliderTexture.topRgt.u = 1.0f;	SliderTexture.topRgt.v = 0.5f;
		SliderTexture.TexIndex = 0;

		texCoord2f SliderBackgroundTexture;
		SliderBackgroundTexture.btmLft.u = 0.0f;	SliderBackgroundTexture.btmLft.v = 0.5f;
		SliderBackgroundTexture.btmRgt.u = 0.5f;	SliderBackgroundTexture.btmRgt.v = 0.5f;
		SliderBackgroundTexture.topLft.u = 0.0f;	SliderBackgroundTexture.topLft.v = 1.0f;
		SliderBackgroundTexture.topRgt.u = 0.5f;	SliderBackgroundTexture.topRgt.v = 1.0f;
		SliderBackgroundTexture.TexIndex = 0;

		TestUIE.SetSize(SizeVertex);
		TestUIE.SetPos(PositionVertex);
		TestUIE.SetBackground(BackgroundTexture);
		TestUIE.SetSliderBackground(SliderBackgroundTexture);
		TestUIE.SetSliderTexture(SliderTexture);
		TestUIE.SetSliderMode(clipFront);
		TestUIE.SetSliderPosition(SliderPositionVertex);
		TestUIE.SetSliderSize(SliderSizeVertex);
		TestUIE.SetUIManDelegate(StatDelegate);
		CFIX_ASSERT(!StatDelegate.empty());
		TestUIE.SetStat(3);
	}

	void After()
	{
	}

	void Test1()
	{
		CFIX_INCONCLUSIVE(__TEXT("Not implemented"));
	}
};

CFIXCC_BEGIN_CLASS(UITest)
	CFIXCC_METHOD(Test1)
CFIXCC_END_CLASS()

